import request from "../common/request"

export const addPostCard = data => {
  return request('/mailbox/userPostcard/addPostCard', data, 'post')
}

export const getPostcardTypeList = data => {
  return request('/mailbox/postcardType/list', data)
}

export const getPostcardList = data => {
  return request('/mailbox/postcard/list', data)
}

export const getUserPostcardList = data => {
  return request('/mailbox/userPostcard/list', data)
}


export const getUserPostcardSelectList = data => {
  return request('/mailbox/userPostcard/selectList', data)
}

export const updateUserPostcard = data => {
  return request('/mailbox/userPostcard', data, 'put', null, false)
}

export const createUserPostcard = data => {
  return request('/mailbox/userPostcard', data, 'post', null, false)
}

export const createCustomPostcard = data => {
  return request('/mailbox/userPostcard/addPostCard', data, 'post', null, false)
}

export const deleteCustomPostcard = data => {
  return request('/mailbox/userPostcard/' + data, null, 'delete', null, false)
}


export const checkMsg = content => {
  return request('/mailbox/check/checkMsg', {
    content: content
  }, 'post')
}

export const getRelyPostcardList = data => {
  return request('/mailbox/replyPostcard/list', data)
}

export const deleteReplyPostcard = data => {
  return request('/mailbox/replyPostcard/delete', data)
}
export const createReplyPostcard = data => {
  return request('/mailbox/replyPostcard/', data, 'post')
}

export const getContent = data => {
  return request('/mailbox/userPostcard/selectOne')
}
export const getCourselImage = data => {
  return request('/mailbox/carouselImage/list')
}